package com.ipfsemc.ipfsemc.service;

import com.ipfsemc.ipfsemc.model.UserInfo;
import com.ipfsemc.ipfsemc.util.JsonData;
import com.ipfsemc.ipfsemc.util.Response;
import com.ipfsemc.ipfsemc.util.ResponseBase;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface IUserInfoService {

    @Transactional(readOnly = true)

//    @Cacheable(value="user",keyGenerator = "myKeyGenerator")//缓存   数据需要改变
    public UserInfo selectByPrimaryKey(String userId);

    public int addUser(UserInfo userInfo);

    public int updateUser(UserInfo userInfo);

    public ResponseBase send(String phone);

    public int updatePhone(String phone,String code);

    public UserInfo userByPhone(String phone);

    @Transactional(readOnly = true)
    public List<UserInfo> list(UserInfo userInfo);

    @Transactional(readOnly = true)
    public UserInfo selectBounty(UserInfo userInfo);

    @Transactional(readOnly = true)
    public UserInfo selectOne(String userId);


    public int updateFil(UserInfo userInfo);

    public UserInfo millItem(UserInfo userInfo);


}
